﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using PSE.Deployment.Engine;
using PSE.Deployment.Engine.Interfaces;
using PSE.Deployment.Setup.Main;
using PSE.Deployment.Setup.Wizard.Steps;
using PSE.Deployment.SetupBase;
using PSE.Deployment.SetupBase.Configuration;
using PSE.Deployment.Util;

namespace PSE.Deployment.Setup.Wizard
{
    public class WizardGroup : BaseStepGroup
    {
        public WizardGroup(IStepGroup parent)
            : base(parent)
        {
            this.Id = "WizardGroup";

            this.ErrorBehavior = PSE.Deployment.Engine.Enums.StepErrorBehavior.CancelParent;
            this.CancelBehavior = PSE.Deployment.Engine.Enums.StepGroupCancelBehavior.CancelParent;
            this.NavigationBehavior = PSE.Deployment.Engine.Enums.StepNavigationBehavior.NextCancel;

            if (!SetupMainFactory.GetInstance<PSEMain>().Parameter.IsInstalled)
            {
                this.Steps.Add(new Steps.Introduction(this));
            }

            this.Steps.Add(new Steps.Prerequisite(this));

            if (!SetupMainFactory.GetInstance<PSEMain>().Parameter.IsInstalled)
            {
                this.Steps.Add(new Steps.InstallationPath(this));
            }
        }
    }
}
